import dashboardRequest from '@/utils/dashboardRequest'
// 列表信息
export const personneList = (params) => dashboardRequest({
  // url: `/user-service/user/searchUserWork?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}`,
  url: '/user-service/user/search',
  params
})

// 编辑  /api/vm-service/region/search
export const regionList = (data) => dashboardRequest({
  url: `https://likede2-admin.itheima.net/likede/api/user-service/user/${data.id}`,
  method: 'PUT',
  data
})

// 添加  /api/vm-service/region/search
export const addRegion = (data) => dashboardRequest({
  url: 'https://likede2-admin.itheima.net/likede/api/user-service/user',
  method: 'POST',
  data,
  headers: { 'Content-Type': 'application/json' }
})
// https://likede2-admin.itheima.net/likede/api
// 区域
export const region = (data) => dashboardRequest({
  url: '/vm-service/region/search',
  data
})

// 删除  /api/user-service/user/:id
export const delList = (id) => dashboardRequest({
  url: `/user-service/user/${id}`,
  method: 'DELETE',
  id
})

// 添加  /api/vm-service/region/search
export const roleList = () => dashboardRequest({
  url: 'https://likede2-admin.itheima.net/likede/api/user-service/role'
})

// 图片上传 /vm-service/sku/fileUpload
export const fileUpload = (data) => dashboardRequest({
  url: 'https://likede2-admin.itheima.net/likede/api/vm-service/sku/fileUpload',
  method: 'POST',
  data,
  headers: { 'Content-Type': 'multipart/form-data' }
})

//
//
//
// 工单量列表
// 列表 https://likede2-admin.itheima.net/likede/api/user-service/user/searchUserWork?pageIndex=1&pageSize=10
export const searchUserWork = (params) => dashboardRequest({
  url: '/user-service/user/searchUserWork',
  params
})

//
//
// https://likede2-admin.itheima.net/likede/api/order-service/report/partnerCollect
// 对账统计
export const partnerCollect = (params) => dashboardRequest({
  url: '/order-service/report/partnerCollect',
  params
})

//
//
//
export const taskReportInfo = () => dashboardRequest({
  url: '/task-service/task/taskReportInfo/2023-03-25%2000:00:00/2023-03-25%2023:59:59'
})

export const taskReportInfoList = () => dashboardRequest({
  url: '/task-service/task/userWorkTop10/2023-03-01/2023-03-25/false/0'
})

export const orderCount1 = () => dashboardRequest({
  url: '/order-service/report/orderCount?start=2023-03-25+00:00:00&end=2023-03-25+23:59:59'
})
///
export const orderCount2 = () => dashboardRequest({
  url: '/order-service/report/orderCount?start=2023-03-01+00:00:00&end=2023-03-25+23:59:59'
})
export const orderAmount = () => dashboardRequest({
  url: '/order-service/report/orderAmount?start=2023-03-01+00:00:00&end=2023-03-25+23:59:59'
})

export const totalBill = () => dashboardRequest({
  url: '/order-service/report/totalBill?start=2023-03-01+00:00:00&end=2023-03-25+23:59:59'
})
